library(tidyverse); library(patchwork)## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ──
## ✓ ggplot2 3.3.5 ✓ purrr 0.3.4
## ✓ tibble 3.1.3 ✓ dplyr 1.0.7
## ✓ tidyr 1.1.3 ✓ stringr 1.4.0
## ✓ readr 2.0.0 ✓ forcats 0.5.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
library(gt); library(viridis)## Loading required package: viridisLite
library(plotly)##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
merged_tax <- read_delim("../microeuks_deepbiosphere_datamine/microeuk-amplicon-survey/data-input/taxonomy.tsv", delim = "\t")
merged_asv <- read_delim("../microeuks_deepbiosphere_datamine/microeuk-amplicon-survey/data-input/microeuk-merged-asv-table.tsv", delim = "\t", skip = 1)
metadata <- read.delim("../microeuks_deepbiosphere_datamine/microeuk-amplicon-survey/data-input/samplelist-metadata.txt")asv_wtax <- merged_asv %>%
select(FeatureID = '#OTU ID', everything()) %>%
pivot_longer(cols = !FeatureID,
names_to = "SAMPLE", values_to = "value") %>%
left_join(merged_tax, by = c("FeatureID" = "Feature ID")) %>%
left_join(metadata) %>%
filter(!grepl("Siders_", SAMPLE)) %>%
filter(SAMPLETYPE != "Incubation") %>%
mutate(DATASET = case_when(
grepl("_GR_", SAMPLE) ~ "GR",
grepl("Gorda", SAMPLE) ~ "GR",
grepl("_MCR_", SAMPLE) ~ "MCR",
grepl("Axial", SAMPLE) ~ "Axial",
TRUE ~ "Control or blank")) %>%
separate(Taxon, c("Domain", "Supergroup",
"Phylum", "Class", "Order",
"Family", "Genus", "Species"), sep = ";", remove = FALSE) %>%
unite(SAMPLENAME, SITE, SAMPLETYPE, YEAR, VENT, SAMPLEID, sep = " ", remove = FALSE)Save to this directory
save(asv_wtax, metadata, file = "data-input/ASVs-18S-survey-03122021.RData")load("data-input/ASVs-18S-survey-03122021.RData", verbose = TRUE)## Loading objects:
## asv_wtax
## metadata
# unique(asv_wtax$Supergroup)
# colnames(asv_wtax)
list_of_metazoa <- asv_wtax %>%
filter(Supergroup == "Opisthokonta") %>%
select(Domain:Species) %>%
distinct()
dim(list_of_metazoa)## [1] 190 8
Output table of all unique metazoan names in dataset.
list_of_metazoa %>%
select(-Domain, -Supergroup) %>%
arrange(Phylum, Class, Order) %>%
gt(
rowname_col = c("Phylum")
) %>%
tab_header(title = "Opisthokonta by Phylum")| Opisthokonta by Phylum | |||||
|---|---|---|---|---|---|
| Class | Order | Family | Genus | Species | |
| Choanoflagellida | Choanoflagellatea | Acanthoecida | Stephanoecidae_Group_D | Stephanoecidae_Group_D_X | Stephanoecidae_Group_D_X_sp. |
| Choanoflagellida | Choanoflagellatea | Acanthoecida | NA | NA | NA |
| Choanoflagellida | Choanoflagellatea | Acanthoecida | Stephanoecidae_Group_E | Stephanoecidae_Group_E_X | Stephanoecidae_Group_E_X_sp. |
| Choanoflagellida | Choanoflagellatea | Acanthoecida | Acanthoecidae_Group_G | Acanthoecidae_Group_G_X | Acanthoecidae_Group_G_X_sp. |
| Choanoflagellida | Choanoflagellatea | Acanthoecida | Stephanoecidae_Group_H | Stephanoecidae_Group_H_X | Stephanoecidae_Group_H_X_sp. |
| Choanoflagellida | Choanoflagellatea | Acanthoecida | Acanthoecidae_Group_G | NA | NA |
| Choanoflagellida | Choanoflagellatea | Acanthoecida | Stephanoecidae_Group_D | NA | NA |
| Choanoflagellida | Choanoflagellatea | Acanthoecida | Stephanoecidae_Group_H | NA | NA |
| Choanoflagellida | Choanoflagellatea | Acanthoecida | Stephanoecidae_Group_I | Stephanoecidae_Group_I_X | Stephanoecidae_Group_I_X_sp. |
| Choanoflagellida | Choanoflagellatea | Acanthoecida | Stephanoecidae_Group_I | NA | NA |
| Choanoflagellida | Choanoflagellatea | Choanoflagellatea_X | Choanoflagellatea_X_Group_L | Choanoflagellatea_X_Group_L_X | Choanoflagellatea_X_Group_L_X_sp. |
| Choanoflagellida | Choanoflagellatea | Choanoflagellatea_X | Choanoflagellatea_X_Group_P | Choanoflagellatea_X_Group_P_X | Choanoflagellatea_X_Group_P_X_sp. |
| Choanoflagellida | Choanoflagellatea | Choanoflagellatea_X | Choanoflagellatea_XX | Salpingoeca_XX | Salpingoeca_XX_sp. |
| Choanoflagellida | Choanoflagellatea | Craspedida | NA | NA | NA |
| Choanoflagellida | Choanoflagellatea | Craspedida | Monosigidae_Group_O | Monosigidae_Group_O_X | Monosigidae_Group_O_X_sp. |
| Choanoflagellida | Choanoflagellatea | Craspedida | Salpingoecidae_Group_C2 | Salpingoecidae_Group_C2_X | Salpingoecidae_Group_C2_X_sp. |
| Choanoflagellida | Choanoflagellatea | Craspedida | Monosigidae_Group_B | Monosigidae_Group_B_X | Monosigidae_Group_B_X_sp. |
| Choanoflagellida | Choanoflagellatea | Craspedida | Salpingoecidae_Group_C2 | NA | NA |
| Choanoflagellida | Choanoflagellatea | Craspedida | Monosigidae_Group_A | Monosigidae_Group_A_X | Monosigidae_Group_A_X_sp. |
| Choanoflagellida | Choanoflagellatea | Craspedida | Monosigidae_Group_A | NA | NA |
| Choanoflagellida | Choanoflagellatea | Craspedida | Monosigidae_Group_A | Monosiga | Monosiga_brevicollis |
| Choanoflagellida | Choanoflagellatea | Craspedida | Monosigidae_Group_A | Codosiga | Codosiga_sp. |
| Choanoflagellida | Choanoflagellatea | Craspedida | Monosigidae_Group_A | Salpingoeca_A | Salpingoeca_A_sp. |
| Choanoflagellida | Choanoflagellatea | Craspedida | Monosigidae_Group_M | Salpingoeca_M | Salpingoeca_tuba |
| Choanoflagellida | Choanoflagellatea | Craspedida | Monosigidae_Group_B | NA | NA |
| Choanoflagellida | Choanoflagellatea | Craspedida | Salpingoecidae_Group_C1 | Salpingoecidae_Group_C1_X | Salpingoecidae_Group_C1_X_sp. |
| Choanoflagellida | Choanoflagellatea | NA | NA | NA | NA |
| Choanoflagellida | Choanoflagellida_X | Choanoflagellida_XX | NA | NA | NA |
| Choanoflagellida | Choanoflagellida_X | Choanoflagellida_XX | Choanoflagellida_XXX | Choanoflagellida_XXXX | Choanoflagellida_XXXX_sp. |
| Choanoflagellida | Choanoflagellida_X | Choanoflagellida_XX | Choanoflagellida_XX_Clade-2 | Choanoflagellida_XX_Clade-2_X | Choanoflagellida_XX_Clade-2_X_sp. |
| Choanoflagellida | NA | NA | NA | NA | NA |
| Fungi | Ascomycota | Pezizomycotina | Eurotiomycetes | Eurotiomycetes_X | Eurotiomycetes_X_sp. |
| Fungi | Ascomycota | Pezizomycotina | Sordariomycetes | Sordariomycetes_X | Sordariomycetes_X_sp. |
| Fungi | Ascomycota | Pezizomycotina | NA | NA | NA |
| Fungi | Ascomycota | Pezizomycotina | Pezizomycetes | Pezizomycetes_X | Pezizomycetes_X_sp. |
| Fungi | Ascomycota | Pezizomycotina | Dothideomycetes | NA | NA |
| Fungi | Ascomycota | Pezizomycotina | Pezizomycotina_X | Pezizomycotina_XX | Pezizomycotina_XX_sp. |
| Fungi | Ascomycota | Pezizomycotina | Eurotiomycetes | NA | NA |
| Fungi | Ascomycota | Pezizomycotina | Dothideomycetes | Verruconis | Verruconis_gallopava |
| Fungi | Ascomycota | Pezizomycotina | Eurotiomycetes | Aspergillus | NA |
| Fungi | Ascomycota | Pezizomycotina | Sordariomycetes | NA | NA |
| Fungi | Ascomycota | Pezizomycotina | Pezizomycotina_X | NA | NA |
| Fungi | Ascomycota | Pezizomycotina | Sordariomycetes | Ascotricha | NA |
| Fungi | Ascomycota | Saccharomycotina | Saccharomycetales | NA | NA |
| Fungi | Ascomycota | Saccharomycotina | Saccharomycetales | Meyerozyma | Meyerozyma_guilliermondii |
| Fungi | Ascomycota | Saccharomycotina | Saccharomycetales | Saccharomycetales_X | Saccharomycetales_X_sp. |
| Fungi | Ascomycota | Saccharomycotina | Saccharomycetales | Candida | NA |
| Fungi | Ascomycota | Saccharomycotina | Saccharomycetales | Saccharomyces | NA |
| Fungi | Ascomycota | Taphrinomycotina | Taphrinomycetes | Taphrina | NA |
| Fungi | Ascomycota | Taphrinomycotina | Schizosaccharomycetes | Schizosaccharomyces | Schizosaccharomyces_japonicus |
| Fungi | Ascomycota | Taphrinomycotina | Taphrinomycetes | NA | NA |
| Fungi | Ascomycota | Taphrinomycotina | Taphrinomycotina_X | Saitoella | Saitoella_complicata |
| Fungi | Ascomycota | NA | NA | NA | NA |
| Fungi | Basidiomycota | Agaricomycotina | Agaricomycetes | Agaricomycetes_X | Agaricomycetes_X_sp. |
| Fungi | Basidiomycota | Agaricomycotina | Agaricomycetes | Auricularia | Auricularia_auricula-judae |
| Fungi | Basidiomycota | Agaricomycotina | Agaricomycetes | NA | NA |
| Fungi | Basidiomycota | Agaricomycotina | Agaricomycetes | Hyphodontia | NA |
| Fungi | Basidiomycota | Agaricomycotina | Tremellomycetes | Tremellomycetes_X | Tremellomycetes_X_sp. |
| Fungi | Basidiomycota | Agaricomycotina | Agaricomycetes | Pleurotus | NA |
| Fungi | Basidiomycota | Agaricomycotina | Tremellomycetes | Trichosporon | NA |
| Fungi | Basidiomycota | Agaricomycotina | Tremellomycetes | NA | NA |
| Fungi | Basidiomycota | Agaricomycotina | Agaricomycetes | Trichaptum | NA |
| Fungi | Basidiomycota | Basidiomycota_X | Basidiomycota_XX | Nephridiophaga | Nephridiophaga_blattellae |
| Fungi | Basidiomycota | Pucciniomycotina | Agaricostilbomycetes | NA | NA |
| Fungi | Basidiomycota | Pucciniomycotina | Microbotryomycetes | Microbotryomycetes_X | Microbotryomycetes_X_sp. |
| Fungi | Basidiomycota | Pucciniomycotina | NA | NA | NA |
| Fungi | Basidiomycota | Pucciniomycotina | Pucciniomycetes | NA | NA |
| Fungi | Basidiomycota | Pucciniomycotina | Cystobasidiomycetes | Rhodotorula | NA |
| Fungi | Basidiomycota | Pucciniomycotina | Cystobasidiomycetes | Rhodotorula | Rhodotorula_mucilaginosa |
| Fungi | Basidiomycota | Pucciniomycotina | Pucciniomycetes | Septobasidium | NA |
| Fungi | Basidiomycota | Pucciniomycotina | Cystobasidiomycetes | Cystobasidiomycetes_X | Cystobasidiomycetes_X_sp. |
| Fungi | Basidiomycota | Pucciniomycotina | Microbotryomycetes | Rhodosporidium | NA |
| Fungi | Basidiomycota | Pucciniomycotina | Cystobasidiomycetes | Rhodotorula | Rhodotorula_glutinis |
| Fungi | Basidiomycota | Pucciniomycotina | Cystobasidiomycetes | NA | NA |
| Fungi | Basidiomycota | Pucciniomycotina | Cystobasidiomycetes | Sporobolomyces | Sporobolomyces_roseus |
| Fungi | Basidiomycota | Ustilaginomycotina | Exobasidiomycetes | Exobasidiomycetes_X | Exobasidiomycetes_X_sp. |
| Fungi | Basidiomycota | Ustilaginomycotina | Ustilaginomycetes | NA | NA |
| Fungi | Basidiomycota | Ustilaginomycotina | Exobasidiomycetes | Malassezia | NA |
| Fungi | Blastocladiomycota | Blastocladiomycotina | Blastocladiomycetes | NA | NA |
| Fungi | Chytridiomycota | Chytridiomycotina | Chytridiomycetes | NA | NA |
| Fungi | Chytridiomycota | Chytridiomycotina | Chytridiomycetes | Chytridiomycetes_X | Chytridiomycetes_X_sp. |
| Fungi | Chytridiomycota | Chytridiomycotina | Chytridiomycetes | Rhyzophidiales_X | Rhyzophidiales_X_sp. |
| Fungi | Chytridiomycota | Chytridiomycotina | NA | NA | NA |
| Fungi | Chytridiomycota | Chytridiomycotina | Chytridiomycetes | Spizellomyces | Spizellomyces_sp. |
| Fungi | Chytridiomycota | Chytridiomycotina | Chytridiomycotina_X | Chytridiomycotina_XX | Chytridiomycotina_XX_sp. |
| Fungi | Chytridiomycota | Chytridiomycotina | Chytridiomycetes | Spizellomycetales-and-Rhizophlyctidales | Spizellomycetales-and-Rhizophlyctidales_sp. |
| Fungi | Chytridiomycota | Chytridiomycotina | Chytridiomycetes | Phlyctochytrium | Phlyctochytrium_planicorne |
| Fungi | Cryptomycota | Cryptomycotina | Cryptomycotina_X | Cryptomycotina_XX | Cryptomycotina_XX_sp. |
| Fungi | Fungi_X | Fungi_XX | Fungi_XXX | Fungi_XXXX | Fungi_XXXX_sp. |
| Fungi | Fungi_X | Fungi_XX | Fungi_XXX | NA | NA |
| Fungi | Microsporidiomycota | Microsporidiomycotina | Microsporidiomycotina_X | Microsporidium | Microsporidium_sp. |
| Fungi | Microsporidiomycota | Microsporidiomycotina | Microsporidiomycotina_X | Facilispora | Facilispora_margolisi |
| Fungi | Mucoromycota | Mucoromycotina | Mucoromycotina_X | Mortierella | Mortierella_wolfii |
| Fungi | Mucoromycota | Mucoromycotina | Mucoromycotina_X | Mucoromycotina_XX | Mucoromycotina_XX_sp. |
| Fungi | Mucoromycota | Mucoromycotina | Mucoromycotina_X | NA | NA |
| Fungi | NA | NA | NA | NA | NA |
| Mesomycetozoa | Ichthyosporea | Ichthyosphonida | Ichthyophonidae_Amoebidianae | NA | NA |
| Mesomycetozoa | Ichthyosporea | Ichthyosphonida | NA | NA | NA |
| Mesomycetozoa | Ichthyosporea | Ichthyosphonida | Pseudoperkinsidae | NA | NA |
| Mesomycetozoa | Ichthyosporea | Ichthyosphonida | Abeoformidae_Group_MAIP_2 | Abeoformidae_Group_MAIP_2_X | Abeoformidae_Group_MAIP_2_X_sp. |
| Mesomycetozoa | Ichthyosporea | Rhynosporida | NA | NA | NA |
| Metazoa | Annelida | Annelida_X | Annelida_XX | NA | NA |
| Metazoa | Annelida | Annelida_X | Annelida_XX | Paralvinella | NA |
| Metazoa | Annelida | Annelida_X | Siboglinidae | NA | NA |
| Metazoa | Annelida | Annelida_X | Annelida_XX | Vigtorniella | Vigtorniella_sp. |
| Metazoa | Annelida | Annelida_X | Annelida_XX | Protodrilus | NA |
| Metazoa | Arthropoda | Chelicerata | Arachnida | NA | NA |
| Metazoa | Arthropoda | Chelicerata | Pycnogonida | NA | NA |
| Metazoa | Arthropoda | Crustacea | Maxillopoda | NA | NA |
| Metazoa | Arthropoda | Crustacea | Maxillopoda | Maxillopoda_X | Maxillopoda_X_sp. |
| Metazoa | Arthropoda | Crustacea | Ostracoda | NA | NA |
| Metazoa | Arthropoda | Crustacea | Maxillopoda | Calocalanus | Calocalanus_sp. |
| Metazoa | Arthropoda | Crustacea | Malacostraca | NA | NA |
| Metazoa | Arthropoda | Crustacea | Maxillopoda | Clausocalanus | Clausocalanus_furcatus |
| Metazoa | Arthropoda | Crustacea | Maxillopoda | Oithona | Oithona_sp. |
| Metazoa | Arthropoda | Crustacea | Maxillopoda | Metridia | Metridia_sp. |
| Metazoa | Arthropoda | Crustacea | Maxillopoda | Eudiaptomus | Eudiaptomus_sp. |
| Metazoa | Arthropoda | Hexapoda | Insecta | NA | NA |
| Metazoa | Bryozoa | Bryozoa_X | Bryozoa_XX | NA | NA |
| Metazoa | Chaetognatha | Aphragmophora | Aphragmophora_X | NA | NA |
| Metazoa | Cnidaria | Cnidaria_X | Hydrozoa | NA | NA |
| Metazoa | Cnidaria | Cnidaria_X | Scyphozoa | NA | NA |
| Metazoa | Cnidaria | Cnidaria_X | Hydrozoa | Hydrozoa_X | Hydrozoa_X_sp. |
| Metazoa | Cnidaria | Cnidaria_X | Hydrozoa | Apolemia | Apolemia_sp. |
| Metazoa | Cnidaria | Cnidaria_X | Anthozoa | Nematostella | Nematostella_vectensis |
| Metazoa | Cnidaria | Cnidaria_X | Anthozoa | NA | NA |
| Metazoa | Cnidaria | Cnidaria_X | Hydrozoa | Zanclea | Zanclea_sp. |
| Metazoa | Cnidaria | Cnidaria_X | Hydrozoa | Cordagalma | Cordagalma_cordiforme |
| Metazoa | Cnidaria | Cnidaria_X | Scyphozoa | Atolla | NA |
| Metazoa | Cnidaria | Cnidaria_X | Hydrozoa | Clytia | NA |
| Metazoa | Cnidaria | Cnidaria_X | Scyphozoa | Phacellophora | NA |
| Metazoa | Cnidaria | Cnidaria_X | Scyphozoa | Cyanea | NA |
| Metazoa | Cnidaria | Cnidaria_X | Scyphozoa | Aurelia | NA |
| Metazoa | Craniata | Craniata_X | Teleostei | NA | NA |
| Metazoa | Craniata | Craniata_X | Lepidosauria | Scincus | Scincus_scincus |
| Metazoa | Craniata | Craniata_X | Mammalia | NA | NA |
| Metazoa | Craniata | Craniata_X | Teleostei | Auxis | Auxis_rochei |
| Metazoa | Craniata | Craniata_X | Teleostei | Salmo | Salmo_salar |
| Metazoa | Craniata | Craniata_X | Mammalia | Homo | Homo_sapiens |
| Metazoa | Ctenophora | Ctenophora_X | Ctenophora_XX | NA | NA |
| Metazoa | Ctenophora | Ctenophora_X | Ctenophora_XX | Beroe | NA |
| Metazoa | Ctenophora | Ctenophora_X | Ctenophora_XX | Ctenophora_XXX | Ctenophora_XXX_sp. |
| Metazoa | Echinodermata | Echinodermata_X | Echinodermata_XX | NA | NA |
| Metazoa | Echinodermata | Echinodermata_X | Echinodermata_XX | Xyloplax | Xyloplax_janetae |
| Metazoa | Gastrotricha | Gastrotricha_X | Gastrotricha_XX | NA | NA |
| Metazoa | Hemichordata | Hemichordata_X | Hemichordata_XX | NA | NA |
| Metazoa | Loricifera | Loricifera_X | Loricifera_XX | Pliciloricus | Pliciloricus_sp. |
| Metazoa | Mesozoa | Mesozoa_X | Orthonectida | Rhopalura | Rhopalura_ophiocomae |
| Metazoa | Metazoa_X | Metazoa_XX | Metazoa_XXX | Metazoa_XXXX | Metazoa_XXXX_sp. |
| Metazoa | Mollusca | Bivalvia | NA | NA | NA |
| Metazoa | Mollusca | Bivalvia | Protobranchia | NA | NA |
| Metazoa | Mollusca | Bivalvia | Heteroconchia | NA | NA |
| Metazoa | Mollusca | Bivalvia | Pectinoida | NA | NA |
| Metazoa | Mollusca | Cephalopoda | Cephalopoda_X | NA | NA |
| Metazoa | Mollusca | Gastropoda | Vetigastropoda | NA | NA |
| Metazoa | Mollusca | Gastropoda | Neritopsina | Depressigyra | Depressigyra_sp. |
| Metazoa | Mollusca | Gastropoda | Heterobranchia | Rissoella_gastropoda | Rissoella_rissoaformis |
| Metazoa | Mollusca | Gastropoda | Vetigastropoda | Vetigastropoda_X | Vetigastropoda_X_sp. |
| Metazoa | Mollusca | Gastropoda | Neritopsina | Depressigyra | NA |
| Metazoa | Mollusca | Gastropoda | Caenogastropoda | NA | NA |
| Metazoa | Mollusca | NA | NA | NA | NA |
| Metazoa | Myxozoa | Myxozoa_X | Myxosporea | Kudoa | NA |
| Metazoa | Myzostomida | Myzostomida_X | Myzostomida_XX | Myzostoma | NA |
| Metazoa | Nematoda | Chromadorea | Chromadorea_X | NA | NA |
| Metazoa | Nematoda | Chromadorea | Chromadorea_X | Chromadorea_XX | Chromadorea_XX_sp. |
| Metazoa | Nematoda | Chromadorea | Chromadorea_X | Leptolaimus | Leptolaimus_sp. |
| Metazoa | Nematoda | Chromadorea | NA | NA | NA |
| Metazoa | Nematoda | Enoplea | Enoplea_X | NA | NA |
| Metazoa | Nemertea | Nemertea_X | Nemertea_XX | NA | NA |
| Metazoa | Nemertea | Nemertea_X | Nemertea_XX | Nemertea_XXX | Nemertea_XXX_sp. |
| Metazoa | Platyhelminthes | Turbellaria | Catenulida | NA | NA |
| Metazoa | Platyhelminthes | Turbellaria | Polycladida | NA | NA |
| Metazoa | Platyhelminthes | Turbellaria | Acoelomorpha | NA | NA |
| Metazoa | Platyhelminthes | Turbellaria | Rhabdocoela | NA | NA |
| Metazoa | Platyhelminthes | Turbellaria | Prolecithophora | Plagiostomum | NA |
| Metazoa | Platyhelminthes | Turbellaria | Seriata | NA | NA |
| Metazoa | Platyhelminthes | Turbellaria | Prolecithophora | NA | NA |
| Metazoa | Platyhelminthes | Turbellaria | Rhabdocoela | Gyratrix | NA |
| Metazoa | Porifera | Porifera_X | Calcarea | NA | NA |
| Metazoa | Porifera | Porifera_X | Hexactinellida | NA | NA |
| Metazoa | Porifera | Porifera_X | Demospongiae | NA | NA |
| Metazoa | Porifera | Porifera_X | Demospongiae | Geodia | NA |
| Metazoa | Rotifera | Rotifera_X | Rotifera_XX | NA | NA |
| Metazoa | Rotifera | Rotifera_X | Rotifera_XX | Rotifera_XXX | Rotifera_XXX_sp. |
| Metazoa | Urochordata | Urochordata_X | Ascidiacea | NA | NA |
| Metazoa | Urochordata | Urochordata_X | Appendicularia | Oikopleura | Oikopleura_dioica |
| Metazoa | Urochordata | Urochordata_X | Ascidiacea | Cyclosalpa | NA |
| Metazoa | NA | NA | NA | NA | NA |
| Opisthokonta_X | Opisthokonta_XX | Opisthokonta_XXX | Opisthokonta_XXXX | Opisthokonta_XXXXX | Opisthokonta_XXXXX_sp. |
| NA | NA | NA | NA | NA | NA |
# Number of ASVs
tmp <- asv_wtax %>%
filter(Supergroup == "Opisthokonta")
100*(length(unique(tmp$FeatureID))/length(unique(asv_wtax$FeatureID)))## [1] 8.849113
# Number of sequences
100*(sum(tmp$value)/sum(asv_wtax$value))## [1] 27.15345
Total number of ASVs across sites is 1587 - totaling to 8.8% of all ASVs recovered and 27% of all sequences.
# head(asv_wtax)
metazoa_all_barplot <- asv_wtax %>%
filter(Supergroup == "Opisthokonta") %>%
filter(Sample_or_Control == "Sample") %>%
# unite(SAMPLETYPE_2, SITE, SAMPLETYPE, sep = " ") %>%
group_by(SITE, SAMPLETYPE, Phylum) %>%
summarise(SUM_CLASS = sum(value)) %>%
# unite(PhylumClass, Phylum, Class, sep = "-") %>%
ggplot(aes(x = SITE, y = SUM_CLASS, fill = Phylum)) +
geom_bar(stat = "identity", position = "fill", color = "white", stroke = 0.1) +
theme_classic() +
coord_flip() +
facet_grid(SAMPLETYPE ~. , space = "free") +
scale_fill_viridis(discrete = TRUE, option = "turbo") +
labs(x = "", y= "Sequence relative abundance") +
theme(legend.position = "bottom")## `summarise()` has grouped output by 'SITE', 'SAMPLETYPE'. You can override using the `.groups` argument.
## Warning: Ignoring unknown parameters: stroke
ggplotly(metazoa_all_barplot)Observations: At the phylum level, metazoa made up the most number of 18S sequences recovered. This was followed by Choanoflagellates in the background and plume environments, and then by fungi in the vent habitats.
# head(asv_wtax)
metazoa_all_barplot_class <- asv_wtax %>%
filter(Supergroup == "Opisthokonta") %>%
filter(Sample_or_Control == "Sample") %>%
# unite(SAMPLETYPE_2, SITE, SAMPLETYPE, sep = " ") %>%
group_by(SITE, SAMPLETYPE, Phylum, Class) %>%
summarise(SUM_CLASS = sum(value)) %>%
unite(PhylumClass, Phylum, Class, sep = "-") %>%
ggplot(aes(x = SITE, y = SUM_CLASS, fill = PhylumClass)) +
geom_bar(stat = "identity", position = "fill", color = "white", stroke = 0.1) +
theme_classic() +
facet_grid(SAMPLETYPE ~. , space = "free") +
coord_flip() +
scale_fill_viridis(discrete = TRUE, option = "inferno") +
labs(x = "", y= "Sequence relative abundance") +
theme(legend.position = "bottom")## `summarise()` has grouped output by 'SITE', 'SAMPLETYPE', 'Phylum'. You can override using the `.groups` argument.
## Warning: Ignoring unknown parameters: stroke
ggplotly(metazoa_all_barplot_class)Observations: There’s a shift in the community from the background and plume habitats having higher relative abundances of Ctenophora and Cnidaria sequences and Chanoflagellates (especially in the plume!), to the diffuse flow fluid having a higher relativea bundance of Annelida, Mollusca, and Arthropoda. (things that settle?)
# head(asv_wtax)
metazoa_only_bar <- asv_wtax %>%
filter(Phylum == "Metazoa") %>%
filter(Sample_or_Control == "Sample") %>%
# unite(SAMPLETYPE_2, SITE, SAMPLETYPE, sep = " ", remove = FALSE) %>%
group_by(SAMPLETYPE, SITE, Class) %>%
summarise(SUM_CLASS = sum(value)) %>%
# unite(PhylumClass, Phylum, Class, sep = "-") %>%
ggplot(aes(x = SITE, y = SUM_CLASS, fill = Class)) +
geom_bar(stat = "identity", position = "fill", color = "white", stroke = 0.1) +
theme_classic() +
facet_grid(SAMPLETYPE ~. , space = "free") +
coord_flip() +
scale_fill_viridis(discrete = TRUE, option = "rocket") +
labs(x = "", y= "Sequence relative abundance") +
theme(legend.position = "bottom")## `summarise()` has grouped output by 'SAMPLETYPE', 'SITE'. You can override using the `.groups` argument.
## Warning: Ignoring unknown parameters: stroke
ggplotly(metazoa_only_bar)# head(asv_wtax)
metazoa_only_Order_bar <- asv_wtax %>%
filter(Phylum == "Metazoa") %>%
filter(Sample_or_Control == "Sample") %>%
# unite(SAMPLETYPE_2, SITE, SAMPLETYPE, sep = " ", remove = FALSE) %>%
group_by(SAMPLETYPE, SITE, Class, Order) %>%
summarise(SUM_CLASS = sum(value)) %>%
unite(ClassOrder, Class, Order, sep = "-") %>%
ggplot(aes(x = SITE, y = SUM_CLASS, fill = ClassOrder)) +
geom_bar(stat = "identity", position = "fill", color = "white", stroke = 0.1) +
theme_classic() +
facet_grid(SAMPLETYPE ~. , space = "free") +
coord_flip() +
scale_fill_viridis(discrete = TRUE, option = "rocket") +
labs(x = "", y= "Sequence relative abundance") +
theme(legend.position = "bottom")## `summarise()` has grouped output by 'SAMPLETYPE', 'SITE', 'Class'. You can override using the `.groups` argument.
## Warning: Ignoring unknown parameters: stroke
ggplotly(metazoa_only_Order_bar)Observations: When we go to the ‘Order’ level for metazoa, we see that many of the taxa names end with **_X**. This means the level is unknown. In the case of the PR2 database, it is still unclear if this means it is because that level is mis-placed, or they didn’t curate the rest of the sequence?
I used V4 primers. We can explore the PR2 database more here: https://pr2database.github.io/pr2database/articles/pr2database.html
# install.packages(devtools)
# devtools::install_github("pr2database/pr2database")